package edu.mobbuzz.web.components;

import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.corelib.components.Form;

import edu.mobbuzz.main.RSSPushServer;
import edu.mobbuzz.web.base.SecureBasePage;

public class StartServer extends SecureBasePage {
	@Component
	private Form startForm;
	private Thread connectThread;
	
	void onSuccessFromStartForm() {
		RSSPushServer app = new RSSPushServer();
		setConnectThread(app.connectToServer());	
	}
	
	void onSelectedFromDelete() {
		
	}
	
	public Thread getConnectThread() {
		return connectThread;
	}
	
	public void setConnectThread(Thread connectThread) {
		this.connectThread = connectThread;
	}

	boolean beforeRender(MarkupWriter writer){
		 return true;
	} 
}
